import request from '@/pages/utils/request'


export function post1(data) {
	console.log("data","post1",data);
  return request.post('/api/course/getMainMenu', {}, {
    header: {
      'Content-Type': 'application/json'
    }
  })
}

export function getChapterPost(categoryId) {
  return request.post('/api/chapter/getChapter', { parentCategoryId:categoryId }, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// getChapterById

export function getChapterById(data) {

  console.log(data,"传入的参数");
  return request.post('/api/chapter/getChapterById', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// chapter/getVideos
export function getVideos(data) {
  console.log(data,"传入的参数");
  return request.post('/api/chapter/getVideos', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// course/hot  获取热门课程
export function getHotCourses(data) { 
  console.log(data,"传入的参数");
  return request.post('/api/course/hot', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}